'use strict';

const BaseController = require('./base');
var TLSSigAPIv2 = require('tls-sig-api-v2');
const { success } = require('../extend/helper');

class ImController extends BaseController {

    /**
     * 获取userSig
     */
    async getUserSig() {
        const api = new TLSSigAPIv2.Api(1400517677, "4f6ed4c8cab6f17cfd9bc1b53d249cc40b8aa4ab46a6ae1df4008745b1256fba");
        const userId = await this.userId();
        const userSig = api.genSig(userId, 86400*180); 
        success({bean: userSig});
    }
}

module.exports = ImController;